Carbon


SetResFileAttrs

Header: Resources.h Carbon status: Supported

Sets a resource fork’s attributes.

void SetResFileAttrs (
    SInt16 refNum, 
    SInt16 attrs
);
refNum

A file reference number for the resource fork whose attributes you want to set. If this value is 0, it represents the System file’s resource fork. However, you shouldn’t change the attributes of the System file’s resource fork. If there’s no resource fork with the given reference number, the function does nothing, and the ResError function returns the result code noErr.

attrs

The attributes to set. Like individual resources, resource forks have attributes that are specified by bits in the low-order byte of a word. When the Resource Manager first creates a resource fork after a call to FSpOpenResFile or a related function, it does not set any of the resource forks’s attributes—that is, they are all set to 0.

DISCUSSION

The Resource Manager sets the mapChanged attribute for the resource fork when you call the ChangedResource, the AddResource, or the RemoveResource function.

AVAILABILITY

Supported in Carbon. Available in Mac OS 8.1 and later when Carbon 1.0.2 or later is present.


© 2000 Apple Computer, Inc. — (Last Updated 5/8/2000)